Fix/fresh start#14
Open
juanfernandezgullermo wants to merge 1 commit into
Open
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideMake the Alembic migration for creating the evo_processor_conversations_tokens table idempotent so it can safely run on fresh startup even if the table already exists. Entity relationship diagram for idempotent evo_processor_conversations_tokens migrationerDiagram
evo_core_agents {
int id
}
evo_processor_conversations_tokens {
int id
int agent_id
int total_tokens
datetime created_at
}
evo_core_agents ||--o{ evo_processor_conversations_tokens : has
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Double-check that
if_not_exists=Trueis actually supported by the Alembic/SQLAlchemy versions in this project; if not, consider using a customop.executeDDL statement or a conditional check for table existence instead. - Be aware that
CREATE TABLE IF NOT EXISTSsemantics are dialect-specific; if this service might run on multiple database backends, you may want to guard the migration with an explicit existence check rather than relying on the dialect’sIF NOT EXISTSsupport.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Double-check that `if_not_exists=True` is actually supported by the Alembic/SQLAlchemy versions in this project; if not, consider using a custom `op.execute` DDL statement or a conditional check for table existence instead.
- Be aware that `CREATE TABLE IF NOT EXISTS` semantics are dialect-specific; if this service might run on multiple database backends, you may want to guard the migration with an explicit existence check rather than relying on the dialect’s `IF NOT EXISTS` support.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Make idempotent Alembic migration for fresh start up
Type of Change
Service(s) Affected
evo-auth-service-community)evo-ai-crm-community)evo-ai-frontend-community)evo-ai-processor-community)evo-ai-core-service-community)Checklist
Summary by Sourcery
Bug Fixes:
evo_processor_agent_memorytable only if it does not already exist.